package com.yan.identitymanagement.domain;

/**
 * @author taoge
 * @Date 2024/7/31 18:35
 * @Description
 */
public class Civics {
    private String name;
    private String id;
    private String sex;
    private String address;

    public Civics(String name, String id, String sex, String address) {
        this.name = name;
        this.id = id;
        this.sex = sex;
        this.address = address;
    }

    public Civics() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Civics civics = (Civics) o;

        if (name != null ? !name.equals(civics.name) : civics.name != null) return false;
        if (id != null ? !id.equals(civics.id) : civics.id != null) return false;
        if (sex != null ? !sex.equals(civics.sex) : civics.sex != null) return false;
        return address != null ? address.equals(civics.address) : civics.address == null;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (id != null ? id.hashCode() : 0);
        result = 31 * result + (sex != null ? sex.hashCode() : 0);
        result = 31 * result + (address != null ? address.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return
              name + "\t" + id + "\t" + sex + "\t" + address;
    }
}
